package rent.hj.videoplayer.widget;

import android.app.Dialog;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.Window;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;

public class CustomDialog
  extends Dialog
{
  private static int default_height = -2;
  private static int default_width = -1;
  
  public CustomDialog(Context paramContext, int paramInt1, int paramInt2)
  {
    this(paramContext, default_width, default_height, paramInt1, paramInt2, false);
  }
  
  public CustomDialog(Context paramContext, int paramInt1, int paramInt2, int paramInt3)
  {
    this(paramContext, paramInt2, default_height, paramInt1, paramInt3, false);
  }
  
  public CustomDialog(Context paramContext, int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean)
  {
    super(paramContext, paramInt4);
    setContentView(paramInt3);
    Window localWindow = getWindow();
    LayoutParams localLayoutParams = localWindow.getAttributes();
    float f = getDensity(paramContext);
    int[] arrayOfInt;
    arrayOfInt = getSrceenPixels(paramContext);
    localLayoutParams.width = arrayOfInt[0];
    localLayoutParams.gravity = 17;
    localWindow.setAttributes(localLayoutParams);
//    if (paramInt1 < 0)
//    {
//      arrayOfInt = getSrceenPixels(paramContext);
//      if (paramBoolean)
//      {
//        localLayoutParams.width = arrayOfInt[0];
//        if (paramInt2 >= 0) {
//          break label119;
//        }
//      }
//    }
//    label119:
//    for (localLayoutParams.height = default_height;; localLayoutParams.height = ((int)(f * paramInt2)))
//    {
//      localLayoutParams.gravity = 17;
//      localWindow.setAttributes(localLayoutParams);
//      return;
//      localLayoutParams.width = ((int)(arrayOfInt[0] - 20.0F * f));
//      break;
//      localLayoutParams.width = ((int)(f * paramInt1));
//      break;
//    }
  }
  
  private float getDensity(Context paramContext)
  {
    return paramContext.getResources().getDisplayMetrics().density;
  }
  
  private int[] getSrceenPixels(Context paramContext)
  {
    DisplayMetrics localDisplayMetrics = new DisplayMetrics();
    ((WindowManager)paramContext.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getMetrics(localDisplayMetrics);
    int[] arrayOfInt = new int[2];
    arrayOfInt[0] = localDisplayMetrics.widthPixels;
    arrayOfInt[1] = localDisplayMetrics.heightPixels;
    return arrayOfInt;
  }
}


/* Location:              C:\Users\Nick\Desktop\classes_dex2jar.jar!\com\lcworld\yunzhitvbox\widget\CustomDialog.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */